package com.abocode.aichat.app.user.service;

import com.abocode.aichat.app.user.api.command.CreateUserCommand;
import com.abocode.aichat.app.user.api.command.UpdateUserAccountCommand;
import com.abocode.aichat.app.user.api.command.UpdateUserCommand;
import com.abocode.aichat.app.user.api.command.UpdateUserPasswordCommand;
import com.abocode.aichat.app.user.model.User;
import com.abocode.aichat.app.user.model.UserIdentity;
import com.abocode.aichat.app.vo.AuthorizationVo;
import com.iflytek.application.common.springjdbc.Pagination;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Created by guanxf on 2015/12/16.
 */

public interface UserService {

    public User create(CreateUserCommand createUserCommand, AuthorizationVo authorizationVo);

    public void update(Long id, UpdateUserCommand updateUserCommand);

    public User get(Long id);

    public void delete(Long id);



    public void updatePassword(Long id, UpdateUserPasswordCommand command);

    public void updateAccount(Long id, UpdateUserAccountCommand command);


    public User login(String loginname, String password) ;

    public void updateAvatar(Long id, String imgUrl);


    public UserIdentity findByIdentity(String identity);

    public User findOne(Long uid);


    public Pagination findAllWithRandom(Pageable pageable);

    public Page findAll(Pageable pageable);
}
